package JavaSE.AnnotationLearning.ReflectTest2;

public class Student {
    @AgeBound(minAge = 20, maxAge = 100)
    private int age;
    @NameBound
    private String name;

    public Student(int age, String name) {
        this.age = age;
        this.name = name;
    }

    @Override
    public String toString() {
        return "学生姓名：" + name + "\r\n年龄为：" + age;
    }
}
